# app/server_status/serializers.py
from rest_framework import serializers
from .models import McServerStatus


class McServerStatusSerializer(serializers.ModelSerializer):
    class Meta:
        model = McServerStatus
        fields = ["id", "status", "created_time", "updated_time"]


class McForeignServerStatusSerializer(serializers.ModelSerializer):
    """用于外键嵌套的轻量版，仅返回必要字段"""
    class Meta:
        model = McServerStatus
        fields = ["id", "status"]
